package com.py.credit.dao;

import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Company: WWW.xypy.com.cn
 * @ClassName XypjUserReportDao
 * @Description: 信用评价查询dao
 * @Params: Test
 * @Author: YaoS
 * @Create: 2018-10-24 17:14
 **/
public interface XypjUserReportDao {
    /**
     * 获取所有的表和表检验规则
     *
     * @param list
     * @param editionId
     * @return List<Map<String, Object>>
     * @author YaoS
     * @date 20:27 18/10/24
     **/
    List<Map<String, Object>> getTableByList(@Param(value = "list") List list,
                                             @Param(value = "editionId") Integer editionId,
                                             @Param(value = "tableList") String tableList
    );

    /**
     * 获取当前版本字段值和校验规则
     *
     * @param tableId
     * @return List<Map<String, Object>>
     * @author YaoS
     * @date 20:27 18/10/24
     **/
    List<Map<String, Object>> getCloumnByList(@Param(value = "tableId") String tableId
    );

    
    /**
     * 获取当前版本字段值和校验规则
     *
     * @param tableId
     * @param editionId
     * @return List<Map<String, Object>>
     * @author YaoS
     * @date 20:27 18/10/24
     **/
    List<Map> getTableValuesByTybmAndTable(@Param(value = "tableName") String tableName,
                                             @Param(value = "tybm") String tybm
    );


    /**
     * 查询指标值
     *
     * @param
     * @return
     * @author YaoS
     * @date 16:50 18/10/29
     **/
    Map<String, Object> selectColumnValue(@Param(value = "tableName") String tableName,
                                                @Param(value = "tybm") String tybm
    );

    /**
     * 查询表名
     *
     * @param
     * @return
     * @author YaoS
     * @date 16:43 18/10/29
     **/
    String selectTableName(String tableId);


    /**
     * 查询法人tybm
     * @param ztmc
     * @return
     */
    String selectFrTybm(@Param(value = "ztmc") String ztmc);

    /**
     * 查询自然人tybm
     * @param ztmc
     * @param bm
     * @return
     */
    String selectZrrTybm(@Param(value = "ztmc") String ztmc,
                         @Param(value = "bm") String bm);

    /**
     * 查询表的数量
     * @param resourceId
     * @return
     */
    int selectTableCount(@Param(value = "resourceId") String resourceId,
                         @Param(value = "tybm") String tybm);
}
